from __future__ import unicode_literals

from django.db import models

# Create your models here.

class Chassis(models.Model):
    Category = models.CharField(max_length = 20,null = True,blank = True)
    Description = models.CharField(max_length = 100,null = True,blank = True)
    SN = models.CharField(max_length = 30,null = True,blank = True)
    Status = models.CharField(max_length = 20,null = True,blank = True)
    PR = models.CharField(max_length = 30,null = True,blank = True)
    RecDate = models.CharField(max_length = 20,null = True,blank = True)
    Location = models.CharField(max_length = 20,null = True,blank = True)
    Name = models.CharField(max_length = 20,null = True,blank = True)
    Owner = models.CharField(max_length = 20,null = True,blank = True)
    Ucs = models.CharField(max_length = 200,null = True,blank = True)
    Comment = models.CharField(max_length = 500,null = True,blank = True)
    class Meta:
        verbose_name = "Chassis"
        verbose_name_plural = "Chassises"

class Server(models.Model):
    Category = models.CharField(max_length = 20,null = True,blank = True)
    Description = models.CharField(max_length = 100,null = True,blank = True)
    SN = models.CharField(max_length = 30,null = True,blank = True)
    Status = models.CharField(max_length = 20,null = True,blank = True)
    PR = models.CharField(max_length = 30,null = True,blank = True)
    RecDate = models.CharField(max_length = 20,null = True,blank = True)
    Location = models.CharField(max_length = 20,null = True,blank = True)
    Name = models.CharField(max_length = 20,null = True,blank = True)
    Version = models.CharField(max_length = 30,null = True,blank = True)
    Owner = models.CharField(max_length = 20,null = True,blank = True)
    Ucs = models.CharField(max_length = 200,null = True,blank = True)
    Comment = models.CharField(max_length = 500,null = True,blank = True)
    class Meta:
        verbose_name = "Server"

class Switch(models.Model):
    Category = models.CharField(max_length = 20,null = True,blank = True)
    Description = models.CharField(max_length = 100,null = True,blank = True)
    SN = models.CharField(max_length = 30,null = True,blank = True)
    Status = models.CharField(max_length = 20,null = True,blank = True)
    PR = models.CharField(max_length = 30,null = True,blank = True)
    RecDate = models.CharField(max_length = 20,null = True,blank = True)
    Location = models.CharField(max_length = 20,null = True,blank = True)
    Name = models.CharField(max_length = 20,null = True,blank = True)
    Comment = models.CharField(max_length = 500,null = True,blank = True)
    Update_Time = models.DateTimeField(auto_now = True,null=True, blank=True)
    class Meta:
        verbose_name = "Switch"
        verbose_name_plural = "Switches"

class Tester(models.Model):
    Category = models.CharField(max_length = 20,null = True,blank = True)
    Description = models.CharField(max_length = 100,null = True,blank = True)
    SN = models.CharField(max_length = 30,null = True,blank = True)
    Status = models.CharField(max_length = 20,null = True,blank = True)
    PR = models.CharField(max_length = 30,null = True,blank = True)
    RecDate = models.CharField(max_length = 20,null = True,blank = True)
    Location = models.CharField(max_length = 20,null = True,blank = True)
    Mgt  = models.CharField(max_length = 20,null = True,blank = True)
    Comment = models.CharField(max_length = 500,null = True,blank = True)
    class Meta:
        verbose_name = "Tester"

class Card(models.Model):
    Category = models.CharField(max_length = 30,null = True,blank = True)
    Description = models.CharField(max_length = 100,null = True,blank = True)
    SN = models.CharField(max_length = 30,null = True,blank = True)
    Status = models.CharField(max_length = 20,null = True,blank = True)
    PR = models.CharField(max_length = 30,null = True,blank = True)
    RecDate = models.CharField(max_length = 20,null = True,blank = True)
    Location = models.CharField(max_length = 20,null = True,blank = True)
    Comment = models.CharField(max_length = 500,null = True,blank = True)
    class Meta:
        verbose_name = "Card"

class CableAndTransceiver(models.Model):
    Category = models.CharField(max_length = 20,null = True,blank = True)
    Description = models.CharField(max_length = 100,null = True,blank = True)
    Qty = models.CharField(max_length = 30,null = True,blank = True)
    SN = models.CharField(max_length = 30,null = True,blank = True)
    Status = models.CharField(max_length = 20,null = True,blank = True)
    PR = models.CharField(max_length = 30,null = True,blank = True)
    RecDate = models.CharField(max_length = 20,null = True,blank = True)
    Location = models.CharField(max_length = 20,null = True,blank = True)
    Comment = models.CharField(max_length = 500,null = True,blank = True)
    class Meta:
        verbose_name = "Cable_And_Transceiver"
        verbose_name_plural = "Cables and Transcivers"
class TrafficPC(models.Model):
    Name = models.CharField(max_length = 20,null = True,blank = True)
    IXIA_API = models.CharField(max_length = 20,null = True,blank = True)
    Spirent_API = models.CharField(max_length = 20,null = True,blank = True)
    Comment = models.CharField(max_length = 100,null = True,blank = True)
    class Meta:
        verbose_name = "Traffic PC"


class RMA(models.Model):
    Category = models.CharField(max_length = 20,null = True,blank = True)
    Description = models.CharField(max_length = 100,null = True,blank = True)
    SN = models.CharField(max_length = 30,null = True,blank = True)
    Status = models.CharField(max_length = 20,null = True,blank = True)
    PR = models.CharField(max_length = 30,null = True,blank = True)
    RecDate = models.CharField(max_length = 20,null = True,blank = True)
    Location = models.CharField(max_length = 20,null = True,blank = True)
    Name = models.CharField(max_length = 20,null = True,blank = True)
    Owner = models.CharField(max_length = 20,null = True,blank = True)
    Ucs = models.CharField(max_length = 200,null = True,blank = True)
    Comment = models.CharField(max_length = 500,null = True,blank = True)
    class Meta:
        verbose_name = "RMA"
        verbose_name_plural = "RMA"

class LendAndBorrow(models.Model):
    Category = models.CharField(max_length = 20,null = True,blank = True)
    Description = models.CharField(max_length = 100,null = True,blank = True)
    SN = models.CharField(max_length = 30,null = True,blank = True)
    Status = models.CharField(max_length = 20,null = True,blank = True)
    PR = models.CharField(max_length = 30,null = True,blank = True)
    RecDate = models.CharField(max_length = 20,null = True,blank = True)
    Location = models.CharField(max_length = 20,null = True,blank = True)
    Name = models.CharField(max_length = 20,null = True,blank = True)
    Owner = models.CharField(max_length = 20,null = True,blank = True)
    Ucs = models.CharField(max_length = 200,null = True,blank = True)
    Comment = models.CharField(max_length = 500,null = True,blank = True)
    class Meta:
        verbose_name = "Lend and Borrow"
        verbose_name_plural = "Lend and Borrow"
class PowerManagement(models.Model):
    Category = models.CharField(max_length = 20,null = True,blank = True)
    Description = models.CharField(max_length = 100,null = True,blank = True)
    SN = models.CharField(max_length = 30,null = True,blank = True)
    Status = models.CharField(max_length = 20,null = True,blank = True)
    PR = models.CharField(max_length = 30,null = True,blank = True)
    RecDate = models.CharField(max_length = 20,null = True,blank = True)
    Location = models.CharField(max_length = 20,null = True,blank = True)
    Name = models.CharField(max_length = 20,null = True,blank = True)
    Owner = models.CharField(max_length = 20,null = True,blank = True)
    Ucs = models.CharField(max_length = 200,null = True,blank = True)
    Comment = models.CharField(max_length = 500,null = True,blank = True)
    class Meta:
        verbose_name = "Power Management"
        verbose_name_plural = "Power Management"
